<?php
/* @var $this OrderController */
/* @var $model order */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'order-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
        <?php echo $form->labelEx($model,'customer_id'); ?>
                <?php echo $form->dropDownList($model, 
                 'customer_id', 
                  CHtml::listData(customer::model()->findAll(), 'id', 'fname', 'lname'), 
                  array('prompt' => 'Choose Customer'));?>
        <?php echo $form->error($model,'customer_id'); ?>
    </div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'order_quantity'); ?>
		<?php echo $form->textField($model,'order_quantity'); ?>
		<?php echo $form->error($model,'order_quantity'); ?>
	</div>
		
	<div class="row">
                <?php echo $form->labelEx($model,'Item'); ?>
                                <?php echo $form->dropDownList($model, 
                 'product_id', 
                  CHtml::listData(product::model()->findAll(), 'id', 'product_desc', 'product_name'), 
                  array('prompt' => 'Choose Item'));?>
                <?php echo $form->error($model,'product_id'); ?>
    </div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->